package gui;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.util.ArrayList;

import javax.swing.JFrame;
import javax.swing.JLabel;

import dao.Field;

import service.Service;

import model.MapObject;
import model.Mob;
import model.SuperMob;


class Mainframe extends JFrame{
	
	private final String headLine = "Level : ";
	private final String underLine = "Underskrift";
	private PanelFieldRect panelFieldRect;
	private JLabel headLiner, underLiner;
	private PanelButtom pb;
	private Service service;
	
	
	
	public Mainframe(int depth, int width){
		setResizable(false);
		setTitle("Tower Defence");
		setLocation(50, 100);

		service = Service.getService();
		headLiner = new JLabel(headLine,JLabel.CENTER);
		underLiner = new JLabel(underLine,JLabel.CENTER);
		panelFieldRect = new PanelFieldRect(depth, width);
				
		pb = new PanelButtom(depth, width);
		service.createField(depth, width);
		
		Container contents = getContentPane();
		contents.add(headLiner,BorderLayout.NORTH);
		contents.add(underLiner,BorderLayout.SOUTH);
		contents.add(panelFieldRect,BorderLayout.CENTER);
		contents.add(pb,BorderLayout.EAST);
				
		
		pack();
		setVisible(true);
		

	}



	public PanelFieldRect getPanelFieldRect() {
		return panelFieldRect;
	}



	public void setPanelFieldRect(PanelFieldRect panelFieldRect) {
		this.panelFieldRect = panelFieldRect;
	}
		

}
